From 47725b3288408216b534bae8d37d8b15087dc326 Mon Sep 17 00:00:00 2001 From: Jimi Xenidis Date: Thu, 8 Feb 2007 07:05:26 -0500 Subject: [PATCH] [LIBXC][POWERPC] make sure DTB is truncated and has a decent mode Also, since we only write to this FD, we mau as well use creat(2) Signed-off-by: Jimi Xenidis Signed-off-by: Hollis Blanchard --HG-- extra : transplant_source : %05%9B%EF%F4%12%9B%C0%FCD%03%2A%95%A8ull%A8%9Fk%21 --- tools/libxc/powerpc64/mk_flatdevtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/powerpc64/mk_flatdevtree.c b/tools/libxc/powerpc64/mk_flatdevtree.c index 14af93336a..a6f1de9150 100644 --- a/tools/libxc/powerpc64/mk_flatdevtree.c +++ b/tools/libxc/powerpc64/mk_flatdevtree.c @@ -618,7 +618,7 @@ int make_devtree(struct ft_cxt *root, } /* write a copy of the tree to a file */ - if ((dtb_fd = open(DTB_FILE , O_CREAT|O_RDWR)) == -1) { + if ((dtb_fd = creat(DTB_FILE, S_IRUSR | S_IWUSR)) == -1) { PERROR("%s: failed to open file %s", __func__, DTB_FILE); goto error; } -- 2.30.2